package com.cowcode.entity;

import java.sql.Timestamp;

public class Text {//评论问题
    private int tid;
    private String ttext;//问题
    private User uid;//用户id
    private Timestamp tsend;//发表时间
    private int aid;//不为0即评论文章
    private int qid;//不为0即评论问题

    public int getTid() {
        return tid;
    }

    public void setTid(int tid) {
        this.tid = tid;
    }

    public String getTtext() {
        return ttext;
    }

    public void setTtext(String ttext) {
        this.ttext = ttext;
    }

    public User getUid() {
        return uid;
    }

    public void setUid(User uid) {
        this.uid = uid;
    }

    public Timestamp getTsend() {
        return tsend;
    }

    public void setTsend(Timestamp tsend) {
        this.tsend = tsend;
    }

    public int getAid() {
        return aid;
    }

    public void setAid(int aid) {
        this.aid = aid;
    }

    public int getQid() {
        return qid;
    }

    public void setQid(int qid) {
        this.qid = qid;
    }

    @Override
    public String toString() {
        return "Text{" +
                "tid=" + tid +
                ", ttext='" + ttext + '\'' +
                ", uid=" + uid +
                ", tsend=" + tsend +
                ", aid=" + aid +
                ", qid=" + qid +
                '}';
    }

    public Text() {
    }

    public Text(int tid, String ttext, User uid, Timestamp tsend, int aid, int qid) {
        this.tid = tid;
        this.ttext = ttext;
        this.uid = uid;
        this.tsend = tsend;
        this.aid = aid;
        this.qid = qid;
    }
}
